{
  function getProp<Type, Key extends keyof Type>(obj: Type, key: Key) {
    return obj[key];
  }
  let obj = { name: "jack", age: 18 };
  getProp(obj, "name");

  // function getProperty<Type extends object, Key extends keyof Type>(obj: Type, key: Key) {
  //   return obj[key]
  // }
  // let obj = { name: 'jack', age: 18 }
  // getProperty(obj, 'name')
}
